<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 考点：常量
    const obj1 = { a: 1 }
    obj1.a = 2;
    console.log(obj1);
    let arr;
    // arr[0] = 1;
    // console.log(arr); // undefined

    // 考点:event_loop 事件循环
    let t1 = new Promise((resolve, reject) => {
        console.log(1);
        resolve(2);
        console.log(3);
    })
    t1.then(res => {
        console.log(res);
    });
    console.log(4);
    //打印结果： 1 3 4 2
</script>

</html>